package com.wing.device.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.common.utils.JsonResult;
import com.wing.device.model.entity.Device;
import com.wing.device.model.request.DeviceForm;
import com.wing.device.model.response.DeviceVO;
import com.wing.web.excel.DeviceExcelIn;

import java.util.List;
import java.util.Map;

/**
 * 设备表-Service
 *
 * @author
 */
public interface DeviceService extends IService<Device> {

    /**
     * 添加
     *
     * @param deviceForm
     * @return
     */
    int add(DeviceForm deviceForm) throws Exception;

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<DeviceVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<DeviceVO> pageList4app(Page page, Map<String, Object> params);


    /**
     * 分页list
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<DeviceVO> pageListProcess(Page page, List<String> deviceCodes);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    DeviceVO get4appById(Long id);

    void updateEnclosure(Long deviceId,String enclosureUrl);

    int save(DeviceForm deviceForm);

    DeviceVO getDeviceVO(String deviceCode);

    void importExcel(List<DeviceExcelIn> list);

    JsonResult getMaxModel(Long devModelId);
}
